﻿using System;
using System.Data;
using System.Collections.Generic;
using Maticsoft.Common;
using Hyfw.Model;
using System.Collections;
namespace Hyfw.BLL
{
    /// <summary>
    /// UserManager
    /// </summary>
    public partial class UserManager
    {
        private readonly Hyfw.DAL.UserService dal = new Hyfw.DAL.UserService();
        public UserManager()
        { }

        public int Add(Hashtable ht)
        {
            return dal.Add(ht);
        }

        public bool Update(Hashtable ht)
        {
            return dal.Update(ht);
        }

        public bool Delete(int id)
        {
            return dal.Delete(id);
        }

        public Hashtable SearchUsers(string key, int pageIndex, int pageSize, string sortFiled, string sortOrder)
        {
            return dal.SearchUsers(key, pageIndex, pageSize, sortFiled, sortOrder);
        }
        public ArrayList Login(string userName, string pwd, out  int returnValue)
        {
            return dal.Login(userName, pwd, out returnValue);
        }

        public ArrayList GetLimits(int roleId)
        {
            return dal.GetLimits(roleId);
        }

        public bool UserNameExist(string userName)
        {
            return dal.UserNameExist(userName);
        }

        public Hashtable GetUser(int id)
        {
            return dal.GetUser(id);
        }



    }
}

